<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Itemgroup_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    
    function insert($name)
    {
        $this->db->insert('item_group', array( 
                                                'id'    => 0,
                                                'name'  => $name
            )
        );
    }
    
    function aList()
    {
        return $this->db->order_by('name', 'ASC')->get('item_group')->result();
    }

}
?>
